@@ -420,7 +420,12 @@ module Agents |
||
| 420 | 420 |
class Seen < Hash |
| 421 | 421 |
def initialize(hash = nil) |
| 422 | 422 |
super() |
| 423 |
- update(hash) if hash |
|
| 423 |
+ if hash |
|
| 424 |
+ # Deserialize a JSON hash which keys are strings |
|
| 425 |
+ hash.each { |uidvalidity, uid|
|
|
| 426 |
+ self[uidvalidity.to_i] = uid |
|
| 427 |
+ } |
|
| 428 |
+ end |
|
| 424 | 429 |
end |
| 425 | 430 |
|
| 426 | 431 |
def []=(uidvalidity, uid) |
@@ -24,7 +24,7 @@ describe Agents::ImapFolderAgent do |
||
| 24 | 24 |
end |
| 25 | 25 |
|
| 26 | 26 |
def uidvalidity |
| 27 |
- '100' |
|
| 27 |
+ 100 |
|
| 28 | 28 |
end |
| 29 | 29 |
|
| 30 | 30 |
def has_attachment? |